package org.test.bookpub.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.test.bookpub.bean.Demo;
import org.test.bookpub.dal.DemoMapper;

@Controller
public class HelloController {

	@Autowired
	private DemoMapper demoMapper;

	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String hello(ModelMap map) {
		map.put("host", "www.baidu.com");
		Demo demo = new Demo();
		demo.setName("lili");
		demoMapper.queryListByCondition(demo);
		return "index";
	}
}
